<template>
	<div class="comment">
		<el-table
		:data="tableData"
		border
		style="width: 100%">
		<el-table-column
		type="index"
		label="序号"
		width="80">
		</el-table-column>
		<el-table-column
		prop="projectName"
		label="课程名称">
		</el-table-column>
		<el-table-column
		prop="content"
		label="评价内容">
		</el-table-column>
		<el-table-column
		prop="reviewDate"
		label="评价时间"
		width="150">
		</el-table-column>
	</el-table>
	</div>
</template>

<script>
import { listReviews } from '@/api/web/index'
import user from '@/store/modules/user'
export default {
	name: 'Comment',
	data() { 
		return {
			//表格数据
			tableData: []
		}
	},
	mounted() { 
		console.log(user)
		this.queryComment();
		
	},
	methods: {
		/**
		 * 查询评价列表
		 */
		async queryComment() {
			let res = await listReviews({
				userId: user.state.id
			});
			if (res.code == 200) { 
				this.tableData = res.rows;
			}
		}
	}
}
</script>

<style lang="scss" scoped>
</style>